<?php if (!defined('NOVA_RUN')) die('You can\'t access this file directly!');

/*
-------------------------------------------------------
*
*   NovaBoard 2
*   Copyright © 2011 NovaBoard team
*
*--------------------------------------------------------
*
*   Official site: www.novaboard.net
*   Contact e-mail: support@novaboard.net
*
*   GNU General Public License, version 2:
*   http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/

// debug (remove for release)
	define('DEBUG_MODE', true); // true or false

// init

	// Autoloader
	require_once ROOT . 'engine/autoload.php';
	
	// Settings holder
	require_once ROOT . 'engine/classes/config.class.php';

	// load Engine class	
	require ROOT . 'engine/engine.php';

	// load Action class
	require (defined('NOVA_ADMIN')) ? ROOT . 'engine/classes/admin_action.class.php' : ROOT . 'engine/classes/action.class.php';

	// load Language class
	require ROOT . 'engine/classes/lang.class.php';

	// load Model class
	require ROOT . 'engine/classes/model.class.php';

	// load Object class
	require ROOT . 'engine/classes/object.class.php';

	// load Plugin class
	require ROOT . 'engine/classes/plugin.class.php';

	// load static Cache class
	require ROOT . 'engine/classes/cache.class.php';

	// load functions library
	require ROOT . 'engine/functions.php';
	
	// Self explanatory really...
	set_exception_handler('exceptionHandler');
	
	// run current action
	if (defined('NOVA_ADMIN'))
		Admin_Action::get_action();
	else
		Action::get_action();
	
// and go back to index.php